home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / manuals / newbies guide to softice / si-ug-chapter09.txt < prev    next >
Text File  |  1999-04-07  |  4KB  |  111 lines

  1. CHAPTER 9 - Back Trace Ranges
  2.  
  3.      09.01 Introduction
  4.      09.02 Using Back Trace Ranges
  5.      09.03 Special Notes
  6.  
  7. 09.01 Introduction
  8.  
  9.      Soft-ICE can collect instruction information in a back trace history
  10.      buffer as your program executes. These instructions can then be
  11.      displayed after a bug has occurred. This allows you to go back and
  12.      retrace a program's action to determine the actual flow of
  13.      instructions preceding a break point.
  14.  
  15.      Instruction information is collected on accesses within a specified
  16.      address range, rather than system wide. The ranges can be from 1 byte
  17.      to 1 megabyte, so if desired, complete system information can be
  18.      obtained. Using specific ranges rather than collecting all
  19.      instructions is useful for two reasons:
  20.  
  21.      1. The back trace history buffer is not cluttered by extraneous
  22.      information that you are not interested in. For example, you may not
  23.      be interested in interrupt activity and execution within MSDOS.
  24.  
  25.      2. Back trace ranges degrade system performance while they are active.
  26.      By limiting the range to an area that you are interested in, you can
  27.      improve system performance greatly.
  28.  
  29.      Soft-ICE has two methods of utilizing the instructions in the back
  30.      trace history buffer:
  31.  
  32.      1. The SHOW command allows you to display instructions from the back
  33.      trace history buffer. You must specify how many instructions you wish
  34.      to go back in the buffer.
  35.  
  36.      2. The TRACE command allows you to go back and replay instructions
  37.      from the back trace history buffer, This way you can see the
  38.      instruction flow within the context of the surrounding program code or
  39.      source code.
  40.  
  41. 09.02 Using Back Trace Ranges
  42.  
  43.      To use back trace ranges you must do the following:
  44.  
  45.      1. Allocate a back trace history buffer of the desired size by
  46.      inserting the /TRA switch on the S-ICE.EXE line in CONFIG.SYS. For
  47.      example, to create a back trace buffer of 100K you might have the
  48.      following line in your CONFIG.SYS file:
  49.  
  50.      DEVICE = S-ICE.EXE 100
  51.  
  52.      A back trace history buffer of 10K is allocated by default. If this is
  53.      suitable for your needs you do not have to allocate a larger buffer.
  54.      The history buffer size is only limited by the amount of extended
  55.      memory available.
  56.  
  57.      2. Enable back trace ranges by creating a memory range break point
  58.      with the T or TW verb. For example:
  59.  
  60.      BPR 1000:0 2000:0 T
  61.  
  62.      The T and TW verbs do not cause break points instead they log
  63.      instruction information that can be displayed later with the SHOW or
  64.      TRACE commands.
  65.  
  66.      3. Set any other break points if desired.
  67.  
  68.      4. Exit from Soft-ICE with the X command.
  69.  
  70.      5. After a break point has occurred, or you have popped Soft-ICE up
  71.      with the hot key, you can display instructions in the buffer with the
  72.      SHOW command. For example, to go back 50 instructions in the buffer
  73.      and display instructions type:
  74.  
  75.      SHOW 50
  76.  
  77.      6. To replay a series of instructions you must first enter trace
  78.      simulation mode with the TRACE command. To begin replaying the
  79.      sequence of instructions starting back 50 in the buffer type:
  80.  
  81.      TRACE 50
  82.  
  83.      7. After you have entered trace simulation mode, you can trace through
  84.      the sequence of instructions by using the XT, XP, or XG commands. This
  85.      allows you to re-enact the program flow. For example, you can single
  86.      step through the sequence of instructions in the buffer, starting at
  87.      the instruction specified by the TRACE command, by typing:
  88.  
  89.      XT
  90.      XT
  91.      .
  92.      .
  93.      .
  94.      XT
  95.  
  96.      The XT command single steps through the back trace history buffer.
  97.  
  98.      The XP command program steps through the back trace history buffer.
  99.  
  100.      The XG command goes to an address in the back trace history buffer.
  101.  
  102.      8. To exit from trace simulation mode type:
  103.  
  104.      TRACE OFF
  105.  
  106.      9. To reset the back trace history buffer, use the X command.
  107.  
  108. 09.03 Special Notes
  109.  
  110.      While in trace simulation mode, most Soft-ICE commands work as normal,
  111.      including